module BlogCommon
	# 登录，默认为a@a.com，供代码嵌入使用，比如include BlogCommon
	def login options={}
		options[:username] ||= 'a@a.com'
		options[:password] ||= '1995o924'

		visit 'devise_users/sign_in'
		fill_in 'Email', with: options[:username]
		fill_in 'Password', with: options[:password]
		click_on "Log in"
	end
end